﻿namespace SPPropertyBagManagement.Code
{
    public static class Extensions
    {
        /// <summary>
        /// Saves property as new.
        /// </summary>
        /// <param name="property">The property.</param>
        public static void SaveAsNew(this Property property)
        {
            PropertyManager.SaveProperty(property, true);
        }

        /// <summary>
        /// Updates the specified property.
        /// </summary>
        /// <param name="property">The property.</param>
        public static void Update(this Property property)
        {
            PropertyManager.SaveProperty(property, false);
        }
    }
}
